Helpful Information
 
 
Category: DOMNode
DOMNode->textContent

Quick question:

Does DOMNode-> (http://www.php.net/manual/en/class.domnode.php#domnode.props.textcontent)textContent (http://www.php.net/manual/en/class.domnode.php#domnode.props.textcontent) return "everything" inside an HTML node (text and HTML tags)?

In other words, can we say that this property is essentially the equivalent of "innerHTML" in JavaScript?

Thanks.

Another question:

How does DOMDocument->loadHTML() (http://www.php.net/manual/en/domdocument.loadhtml.php) react to HTML that isn't well-formed?

Does it simply ignore/omit nodes that it can't read?

Quick question:

Does DOMNode-> (http://www.php.net/manual/en/class.domnode.php#domnode.props.textcontent)textContent (http://www.php.net/manual/en/class.domnode.php#domnode.props.textcontent) return "everything" inside an HTML node (text and HTML tags)?

In other words, can we say that this property is essentially the equivalent of "innerHTML" in JavaScript?

Thanks.

DOMNode-> (http://www.php.net/manual/en/class.domnode.php#domnode.props.textcontent)textContent (http://www.php.net/manual/en/class.domnode.php#domnode.props.textcontent) appears to only return the text in that node and its child nodes (the text is all "lumped" together if the node has child nodes that contain text as well). It doesn't appear to see HTML tags. Too bad...:rolleyes:










privacy (GDPR)